package com.base.file;

import com.alibaba.fastjson.JSONObject;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: xuyou
 * @Date: 2024/1/5 17:19
 * @Description:
 */
public class Main {

    public static void main(String[] args) {

//        // 指定txt文件的路径
//        String filePath = "D:/地区.txt";
//
//        try {
//            // 创建BufferedReader对象读取文件
//            BufferedReader reader = new BufferedReader(new FileReader(filePath));
//
//            Map<String,String> map = new HashMap<>();
//            // 逐行读取文本内容并输出
//            String line;
//            while ((line = reader.readLine()) != null) {
//                System.out.println(line);
//                String[] s = line.split(" ");
//                String s1 = s[1];
//                map.put(s[0],s1.substring(0,s1.length()-2));
//            }
////            System.out.println(map);
//
//            String s = JSONObject.toJSONString(map);
//            System.out.println(s);
//
//            // 关闭流
//            reader.close();
//        } catch (IOException e) {
//            System.err.println("Error reading the file: " + e.getMessage());
//        }
        String json = "{\"贵阳市\":\"5201\",\"长春市\":\"2201\",\"七台河市\":\"2309\",\"达州市\":\"5117\",\"徐州市\":\"3203\",\"湖北省\":\"4200\",\"绵阳市\":\"5107\",\"阿拉善盟\":\"1529\",\"厦门市\":\"3502\",\"常德市\":\"4307\",\"咸宁市\":\"4212\",\"江门市\":\"4407\",\"安阳市\":\"4105\",\"定西市\":\"6211\",\"乌鲁木齐市\":\"6501\",\"安康市\":\"6109\",\"邢台市\":\"1305\",\"海北藏族自治州\":\"6322\",\"吴忠市\":\"6403\",\"广西壮族自治区\":\"4500\",\"黑河市\":\"2311\",\"昌都市\":\"5403\",\"吉安市\":\"3608\",\"鸡西市\":\"2303\",\"遵义市\":\"5203\",\"迪庆藏族自治州\":\"5334\",\"果洛藏族自治州\":\"6326\",\"金华市\":\"3307\",\"大连市\":\"2102\",\"陇南市\":\"6212\",\"扬州市\":\"3210\",\"湘西土家族苗族自治州\":\"4331\",\"河池市\":\"4512\",\"甘肃省\":\"6200\",\"伊春市\":\"2307\",\"陕西省\":\"6100\",\"浙江省\":\"3300\",\"辽宁省\":\"2100\",\"庆阳市\":\"6210\",\"克孜勒苏柯尔克孜自治州\":\"6530\",\"衡阳市\":\"4304\",\"铜陵市\":\"3407\",\"南昌市\":\"3601\",\"广东省\":\"4400\",\"牡丹江市\":\"2310\",\"鄂州市\":\"4207\",\"遂宁市\":\"5109\",\"曲靖市\":\"5303\",\"三明市\":\"3504\",\"娄底市\":\"4313\",\"阿里地区\":\"5425\",\"包头市\":\"1502\",\"开封市\":\"4102\",\"黄石市\":\"4202\",\"普洱市\":\"5308\",\"聊城市\":\"3715\",\"荆州市\":\"4210\",\"六盘水市\":\"5202\",\"资阳市\":\"5120\",\"长治市\":\"1404\",\"吉林市\":\"2202\",\"临沧市\":\"5309\",\"宁夏回族自治区\":\"6400\",\"淮南市\":\"3404\",\"郑州市\":\"4101\",\"玉溪市\":\"5304\",\"延安市\":\"6106\",\"平凉市\":\"6208\",\"衡水市\":\"1311\",\"雄安新区\":\"1331\",\"平顶山市\":\"4104\",\"温州市\":\"3303\",\"马鞍山市\":\"3405\",\"襄阳市\":\"4206\",\"福州市\":\"3501\",\"兰州市\":\"6201\",\"忻州市\":\"1409\",\"天水市\":\"6205\",\"西宁市\":\"6301\",\"丹东市\":\"2106\",\"威海市\":\"3710\",\"朔州市\":\"1406\",\"长沙市\":\"4301\",\"丽水市\":\"3311\",\"潮州市\":\"4451\",\"宜春市\":\"3609\",\"焦作市\":\"4108\",\"辽阳市\":\"2110\",\"阿坝藏族羌族自治州\":\"5132\",\"抚州市\":\"3610\",\"烟台市\":\"3706\",\"恩施土家族苗族自治州\":\"4228\",\"贺州市\":\"4511\",\"楚雄彝族自治州\":\"5323\",\"柳州市\":\"4502\",\"宿州市\":\"3413\",\"德宏傣族景颇族自治州\":\"5331\",\"晋中市\":\"1407\",\"阿克苏地区\":\"6529\",\"石家庄市\":\"1301\",\"珠海市\":\"4404\",\"澳门特别行政区\":\"8200\",\"南阳市\":\"4113\",\"哈密市\":\"6505\",\"台州市\":\"3310\",\"承德市\":\"1308\",\"哈尔滨市\":\"2301\",\"鹤壁市\":\"4106\",\"鄂尔多斯市\":\"1506\",\"赣州市\":\"3607\",\"桂林市\":\"4503\",\"吐鲁番市\":\"6504\",\"海西蒙古族藏族自治州\":\"6328\",\"乌兰察布市\":\"1509\",\"营口市\":\"2108\",\"佳木斯市\":\"2308\",\"德州市\":\"3714\",\"博尔塔拉蒙古自治州\":\"6527\",\"东营市\":\"3705\",\"漯河市\":\"4111\",\"广元市\":\"5108\",\"湛江市\":\"4408\",\"绥化市\":\"2312\",\"阳江市\":\"4417\",\"内蒙古自治区\":\"1500\",\"海东市\":\"6302\",\"梅州市\":\"4414\",\"延边朝鲜族自治州\":\"2224\",\"河源市\":\"4416\",\"福建省\":\"3500\",\"南平市\":\"3507\",\"鹰潭市\":\"3606\",\"贵州省\":\"5200\",\"白银市\":\"6204\",\"新疆生产建设兵团下辖县级市\":\"0000\",\"邯郸市\":\"1304\",\"湖南省\":\"4300\",\"榆林市\":\"6108\",\"景德镇市\":\"3602\",\"巴音郭楞蒙古自治州\":\"6528\",\"秦皇岛市\":\"1303\",\"山南市\":\"5405\",\"怀化市\":\"4312\",\"汉中市\":\"6107\",\"拉萨市\":\"5401\",\"呼和浩特市\":\"1501\",\"亳州市\":\"3416\",\"安庆市\":\"3408\",\"重庆市\":\"5000\",\"肇庆市\":\"4412\",\"信阳市\":\"4115\",\"随州市\":\"4213\",\"晋城市\":\"1405\",\"白城市\":\"2208\",\"新乡市\":\"4107\",\"内江市\":\"5110\",\"大庆市\":\"2306\",\"六安市\":\"3415\",\"济南市\":\"3701\",\"新余市\":\"3605\",\"山西省\":\"1400\",\"塔城地区\":\"6542\",\"银川市\":\"6401\",\"百色市\":\"4510\",\"巴中市\":\"5119\",\"酒泉市\":\"6209\",\"苏州市\":\"3205\",\"铜仁市\":\"5206\",\"宿迁市\":\"3213\",\"淄博市\":\"3703\",\"盐城市\":\"3209\",\"阜阳市\":\"3412\",\"黔南布依族苗族自治州\":\"5227\",\"宁德市\":\"3509\",\"昌吉回族自治州\":\"6523\",\"防城港市\":\"4506\",\"湖州市\":\"3305\",\"儋州市\":\"4604\",\"江苏省\":\"3200\",\"日喀则市\":\"5402\",\"那曲市\":\"5406\",\"甘南藏族自治州\":\"6230\",\"沈阳市\":\"2101\",\"河北省\":\"1300\",\"武汉市\":\"4201\",\"荆门市\":\"4208\",\"和田地区\":\"6532\",\"阿勒泰地区\":\"6543\",\"湘潭市\":\"4303\",\"韶关市\":\"4402\",\"莆田市\":\"3503\",\"白山市\":\"2206\",\"双鸭山市\":\"2305\",\"洛阳市\":\"4103\",\"黄山市\":\"3410\",\"玉林市\":\"4509\",\"濮阳市\":\"4109\",\"廊坊市\":\"1310\",\"泰安市\":\"3709\",\"阜新市\":\"2109\",\"株洲市\":\"4302\",\"南京市\":\"3201\",\"乐山市\":\"5111\",\"钦州市\":\"4507\",\"张家口市\":\"1307\",\"宝鸡市\":\"6103\",\"临夏回族自治州\":\"6229\",\"广安市\":\"5116\",\"镇江市\":\"3211\",\"许昌市\":\"4110\",\"三门峡市\":\"4112\",\"成都市\":\"5101\",\"金昌市\":\"6203\",\"天津市\":\"1200\",\"汕尾市\":\"4415\",\"张掖市\":\"6207\",\"伊犁哈萨克自治州\":\"6540\",\"吕梁市\":\"1411\",\"呼伦贝尔市\":\"1507\",\"商洛市\":\"6110\",\"西藏自治区\":\"5400\",\"深圳市\":\"4403\",\"菏泽市\":\"3717\",\"林芝市\":\"5404\",\"大兴安岭地区\":\"2327\",\"临汾市\":\"1410\",\"崇左市\":\"4514\",\"岳阳市\":\"4306\",\"安徽省\":\"3400\",\"合肥市\":\"3401\",\"铁岭市\":\"2112\",\"通辽市\":\"1505\",\"本溪市\":\"2105\",\"揭阳市\":\"4452\",\"西安市\":\"6101\",\"大理白族自治州\":\"5329\",\"喀什地区\":\"6531\",\"吉林省\":\"2200\",\"四平市\":\"2203\",\"梧州市\":\"4504\",\"三亚市\":\"4602\",\"德阳市\":\"5106\",\"雅安市\":\"5118\",\"滨州市\":\"3716\",\"黄冈市\":\"4211\",\"三沙市\":\"4603\",\"通化市\":\"2205\",\"锡林郭勒盟\":\"1525\",\"抚顺市\":\"2104\",\"沧州市\":\"1309\",\"赤峰市\":\"1504\",\"北京市\":\"1100\",\"巴彦淖尔市\":\"1508\",\"泰州市\":\"3212\",\"无锡市\":\"3202\",\"常州市\":\"3204\",\"枣庄市\":\"3704\",\"红河哈尼族彝族自治州\":\"5325\",\"保定市\":\"1306\",\"宜昌市\":\"4205\",\"克拉玛依市\":\"6502\",\"萍乡市\":\"3603\",\"泸州市\":\"5105\",\"佛山市\":\"4406\",\"保山市\":\"5305\",\"青海省\":\"6300\",\"安顺市\":\"5204\",\"黔东南苗族侗族自治州\":\"5226\",\"南宁市\":\"4501\",\"绍兴市\":\"3306\",\"齐齐哈尔市\":\"2302\",\"孝感市\":\"4209\",\"大同市\":\"1402\",\"乌海市\":\"1503\",\"昭通市\":\"5306\",\"海南藏族自治州\":\"6325\",\"葫芦岛市\":\"2114\",\"北海市\":\"4505\",\"唐山市\":\"1302\",\"阳泉市\":\"1403\",\"四川省\":\"5100\",\"文山壮族苗族自治州\":\"5326\",\"十堰市\":\"4203\",\"云浮市\":\"4453\",\"自贡市\":\"5103\",\"九江市\":\"3604\",\"海口市\":\"4601\",\"西双版纳傣族自治州\":\"5328\",\"邵阳市\":\"4305\",\"凉山彝族自治州\":\"5134\",\"黔西南布依族苗族自治州\":\"5223\",\"朝阳市\":\"2113\",\"武威市\":\"6206\",\"嘉兴市\":\"3304\",\"铜川市\":\"6102\",\"杭州市\":\"3301\",\"淮北市\":\"3406\",\"周口市\":\"4116\",\"盘锦市\":\"2111\",\"怒江傈僳族自治州\":\"5333\",\"江西省\":\"3600\",\"来宾市\":\"4513\",\"潍坊市\":\"3707\",\"益阳市\":\"4309\",\"蚌埠市\":\"3403\",\"日照市\":\"3711\",\"淮安市\":\"3208\",\"龙岩市\":\"3508\",\"攀枝花市\":\"5104\",\"眉山市\":\"5114\",\"锦州市\":\"2107\",\"昆明市\":\"5301\",\"惠州市\":\"4413\",\"丽江市\":\"5307\",\"太原市\":\"1401\",\"宣城市\":\"3418\",\"贵港市\":\"4508\",\"南充市\":\"5113\",\"咸阳市\":\"6104\",\"鞍山市\":\"2103\",\"黄南藏族自治州\":\"6323\",\"永州市\":\"4311\",\"汕头市\":\"4405\",\"宜宾市\":\"5115\",\"宁波市\":\"3302\",\"清远市\":\"4418\",\"辽源市\":\"2204\",\"上海市\":\"3100\",\"临沂市\":\"3713\",\"石嘴山市\":\"6402\",\"泉州市\":\"3505\",\"甘孜藏族自治州\":\"5133\",\"济宁市\":\"3708\",\"玉树藏族自治州\":\"6327\",\"中卫市\":\"6405\",\"衢州市\":\"3308\",\"广州市\":\"4401\",\"香港特别行政区\":\"8100\",\"滁州市\":\"3411\",\"松原市\":\"2207\",\"渭南市\":\"6105\",\"新疆维吾尔自治区\":\"6500\",\"驻马店市\":\"4117\",\"兴安盟\":\"1522\",\"青岛市\":\"3702\",\"河南省\":\"4100\",\"上饶市\":\"3611\",\"茂名市\":\"4409\",\"运城市\":\"1408\",\"舟山市\":\"3309\",\"海南省\":\"4600\",\"池州市\":\"3417\",\"张家界市\":\"4308\",\"云南省\":\"5300\",\"固原市\":\"6404\",\"芜湖市\":\"3402\",\"鹤岗市\":\"2304\",\"毕节市\":\"5205\",\"山东省\":\"3700\",\"郴州市\":\"4310\",\"南通市\":\"3206\",\"商丘市\":\"4114\",\"漳州市\":\"3506\",\"黑龙江省\":\"2300\",\"连云港市\":\"3207\"}\n";
        HashMap hashMap = JSONObject.parseObject(json, HashMap.class);
        System.out.println(hashMap);

    }


}
